
package mscs.testCase;

import static org.junit.Assert.assertEquals;

import logic.controller.GoodsManageController;
import logic.interfaces.GoodsManageInterface;
import logic.model.GoodsManageModel;


import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import data.Goods;
import data.GoodsData;

import view.ManageItemPanel;
import view.MainView;
public class testDeleteData {
	MainView v=new MainView();
	ManageItemPanel manageItemPanel=new ManageItemPanel();
	GoodsManageModel goods_model = new GoodsManageModel();
	
	@Before
	public void setUp() throws Exception {
		v.TestMode = 1;
		v.showManageItemPanel();
		
	}

	@After
	public void tearDown() throws Exception {
	}

	
	@Test
	public void testAdd() {
		manageItemPanel.btn_delete.doClick();
		manageItemPanel.text_ID1.setText("50002");
		manageItemPanel.btn_deleteSure.doClick();
		GoodsData gd=goods_model.getData();
		Goods g=gd.getGoodsByID("50002");
		assertEquals(g,null);
	}
}
